import  urllib.request
for i in range(-1):
    url = "https://www.qiushibaike.com/8hr/page/"+i
    headers = ("User-Agent","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36")
    opener = urllib.request.build_opener()
    opener.addheaders = [headers]
    data = opener.open(url).read()
    urllib.request.install_opener(opener)
    data2 = urllib.request.urlopen(url).read().decode('utf-8')

    fl = open("./qiushibaike"+i+".html","w")
    fl.write(data2)
    fl.close()


